Timm Bäder [Tue, 31 Oct 2017 05:35:27 +0000 (06:35 +0100)]
widget: Rename color variable to match the color
Timm Bäder [Mon, 30 Oct 2017 16:47:59 +0000 (17:47 +0100)]
viewport: Simplify child allocation
allocation->x and allocation->y are always 0
Timm Bäder [Sun, 29 Oct 2017 19:10:44 +0000 (20:10 +0100)]
widget: Improve get_request_mode vfunc docs
Timm Bäder [Sun, 29 Oct 2017 18:44:06 +0000 (19:44 +0100)]
gskpango: Remove GDK api macros
They only belong on public functions.
Benjamin Otte [Tue, 31 Oct 2017 07:25:10 +0000 (08:25 +0100)]
docs: Fix up some places that still said screen instead of display
Benjamin Otte [Tue, 31 Oct 2017 07:23:07 +0000 (08:23 +0100)]
settings: Remove gtk_settings_get_for_screen()
All users of it are gone now.
Benjamin Otte [Tue, 31 Oct 2017 07:17:37 +0000 (08:17 +0100)]
widget: Remove gtk_widget_get_screen()
Replace the remaining users with "correct" code that does not need that
function anymore.
Benjamin Otte [Tue, 31 Oct 2017 07:07:32 +0000 (08:07 +0100)]
invisible: Make it use display, not screen
Benjamin Otte [Tue, 31 Oct 2017 06:51:15 +0000 (07:51 +0100)]
mountoperation: Move from screen to display
Benjamin Otte [Tue, 31 Oct 2017 06:41:15 +0000 (07:41 +0100)]
window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.
Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
Chun-wei Fan [Tue, 31 Oct 2017 04:49:44 +0000 (12:49 +0800)]
gdk/win32: Fix build after GdkScreen and settings changes
Implement GdkDisplay->get_setting() using the existing
_gdk_win32_screen_get_setting() and get rid of GdkScreen->get_setting()
as a result, to follow the changes in GDK.
Also, since we don't emit settings events in the Windows GDK backend,
but we acquire settings to print using GDK_SETTING, drop all references
related to GDK_SETTING since that is now removed. Update the debug
strings that are print out as a result
(gdk_screen_get_setting->gdk_display_get_setting).
https://bugzilla.gnome.org/show_bug.cgi?id=773299
Benjamin Otte [Tue, 31 Oct 2017 05:17:40 +0000 (06:17 +0100)]
styleprovider: Fix fallout from merge
StyleProvider should inherit from GObject, not from itself.
Benjamin Otte [Tue, 31 Oct 2017 05:09:33 +0000 (06:09 +0100)]
gtk: Fix debug build
It seems I didn't have debug builds enabled and forgot some
return_if_fail()s when doing the last patch.
Piotr Drąg [Tue, 31 Oct 2017 04:28:36 +0000 (05:28 +0100)]
Update POTFILES.in
Benjamin Otte [Tue, 31 Oct 2017 03:31:46 +0000 (04:31 +0100)]
css: Merge GtkStyleProviderPrivate into GtkStyleProvider
This is just lots of renaming.
The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
Benjamin Otte [Tue, 31 Oct 2017 02:26:54 +0000 (03:26 +0100)]
window: Remove gtk_window_get_screen()
It's identical to gtk_widget_get_screen(), just use that one.
Benjamin Otte [Tue, 31 Oct 2017 02:19:29 +0000 (03:19 +0100)]
widget: Remove gtk_widget_has_screen()
All widgets always have a screen (or display).
Matthias Clasen [Tue, 31 Oct 2017 03:06:17 +0000 (23:06 -0400)]
Forgotten file
Matthias Clasen [Tue, 31 Oct 2017 03:01:34 +0000 (23:01 -0400)]
Drop gdk_app_launch_context_set_screen
This function is not necessary, since we already know the display.
Matthias Clasen [Tue, 31 Oct 2017 02:52:49 +0000 (22:52 -0400)]
printoperation: Stop using gdk_app_launch_context_set_screen
It is not necessary.
Matthias Clasen [Tue, 31 Oct 2017 02:20:47 +0000 (22:20 -0400)]
Drop gdk_event_set/get_screen
These functions have been replaced by display variants.
Matthias Clasen [Tue, 31 Oct 2017 02:15:57 +0000 (22:15 -0400)]
gtk: Stop using gdk_event_get_screen
Use gdk_event_get_display instead.
Matthias Clasen [Tue, 31 Oct 2017 02:15:29 +0000 (22:15 -0400)]
gdk: Stop using gdk_event_set_screen
Use gdk_event_set_display instead.
Matthias Clasen [Tue, 31 Oct 2017 01:49:30 +0000 (21:49 -0400)]
Add gdk_event_get/set_display
The GdkScreen apis are going away, this is a replacement.
Benjamin Otte [Tue, 31 Oct 2017 01:59:06 +0000 (02:59 +0100)]
icontheme: Use GdkDisplay instead of GdkScreen
Benjamin Otte [Tue, 31 Oct 2017 01:35:21 +0000 (02:35 +0100)]
stylecontext: Port to use display instead of screen
Benjamin Otte [Tue, 31 Oct 2017 01:34:25 +0000 (02:34 +0100)]
gtk-demo: Remove calls to gtk_style_context_reset_widgets()
Those calls have been unneeded for a long time - since we gained the
changed signal on the StyleProvider in fact.
Matthias Clasen [Tue, 31 Oct 2017 01:36:37 +0000 (21:36 -0400)]
Drop gdk_pango_context_get
This is a trivial convenience api, and it is not used in gtk.
Matthias Clasen [Tue, 31 Oct 2017 01:35:48 +0000 (21:35 -0400)]
tests: Stop using gdk_pango_context_get.
We can just as well get the display ourselves.
Matthias Clasen [Tue, 31 Oct 2017 01:29:48 +0000 (21:29 -0400)]
Drop gdk_pango_context_get_for_screen
GdkScreen is going away, and this api is unused in gtk.
Benjamin Otte [Mon, 30 Oct 2017 23:44:35 +0000 (00:44 +0100)]
immulticontext: Remove unused variable
Benjamin Otte [Mon, 30 Oct 2017 21:19:02 +0000 (22:19 +0100)]
widget: Turn screen-changed signal into display-changed
Benjamin Otte [Mon, 30 Oct 2017 21:02:35 +0000 (22:02 +0100)]
settings: Don't store the screen in the settings object
Screens are going away.
Code that still needs the screen just gets it from the display.
Matthias Clasen [Mon, 30 Oct 2017 23:30:29 +0000 (19:30 -0400)]
immulticontext: Avoid GdkScreen api
No need for it here either.
Matthias Clasen [Mon, 30 Oct 2017 23:27:36 +0000 (19:27 -0400)]
immodule: Avoid GdkScreen api
Another place where it is not needed.
Matthias Clasen [Mon, 30 Oct 2017 23:19:04 +0000 (19:19 -0400)]
modules: Avoid GdkScreen api
No need for this here either.
Matthias Clasen [Mon, 30 Oct 2017 23:07:14 +0000 (19:07 -0400)]
assistant: Avoid GdkScreen api
There is no need at all here to use gtk_settings_get_for_screen.
Matthias Clasen [Mon, 30 Oct 2017 22:58:05 +0000 (18:58 -0400)]
Some documentation updates
Document gtk_settings_get_for_display instead of for_screen.
Matthias Clasen [Mon, 30 Oct 2017 21:03:09 +0000 (17:03 -0400)]
Drop gdk_screen_get_setting
It has been replaced by gdk_display_get_setting.
Matthias Clasen [Mon, 30 Oct 2017 21:01:46 +0000 (17:01 -0400)]
wayland: Stop using gdk_screen_get_setting
Use gdk_display_get_setting instead.
Matthias Clasen [Mon, 30 Oct 2017 21:01:18 +0000 (17:01 -0400)]
x11: Stop using gdk_screen_get_setting
Use gdk_display_get_setting instead.
Matthias Clasen [Mon, 30 Oct 2017 20:53:17 +0000 (16:53 -0400)]
Drop the GdkScreen get_setting vfunc
It is unused.
Matthias Clasen [Mon, 30 Oct 2017 20:52:56 +0000 (16:52 -0400)]
x11: Don't set the GdkScreen get_setting vfunc
We are not using it anymore.
Matthias Clasen [Mon, 30 Oct 2017 20:52:39 +0000 (16:52 -0400)]
wayland: Don't set the GdkScreen get_setting vfunc
We are not using it anymore.
Matthias Clasen [Mon, 30 Oct 2017 20:52:21 +0000 (16:52 -0400)]
broadway: Don't set the GdkScreen get_setting vfunc
We are not using it anymore.
Matthias Clasen [Mon, 30 Oct 2017 20:51:59 +0000 (16:51 -0400)]
quartz: Don't set the GdkScreen get_setting vfunc
We are not using it anymore.
Matthias Clasen [Mon, 30 Oct 2017 20:51:38 +0000 (16:51 -0400)]
mir: Don't set the GdkScreen get_setting vfunc
We don't use it anymore.
Matthias Clasen [Mon, 30 Oct 2017 20:50:41 +0000 (16:50 -0400)]
gtk: Avoid using gdk_screen_get_setting
We can get the setting from the display instead.
Matthias Clasen [Mon, 30 Oct 2017 20:50:14 +0000 (16:50 -0400)]
Add gtk_settings_get_for_display
This will help us avoiding screens in many places.
Matthias Clasen [Mon, 30 Oct 2017 20:45:36 +0000 (16:45 -0400)]
Stop using the GdkScreen get_setting vfunc
We can now call the GdkDisplay implementation instead.
Matthias Clasen [Mon, 30 Oct 2017 20:44:47 +0000 (16:44 -0400)]
use the GdkDisplay get_setting vfunc
Instead of calling the GdkScreen implementation, use our
own vfunc now.
Matthias Clasen [Mon, 30 Oct 2017 20:44:18 +0000 (16:44 -0400)]
x11: Implement the GdkDisplay get_setting vfunc
Just call the GdkScreen vfunc.
Matthias Clasen [Mon, 30 Oct 2017 20:43:50 +0000 (16:43 -0400)]
wayland: Implement the GdkDisplay get_setting vfunc
Just call the GdkScreen vfunc.
Matthias Clasen [Mon, 30 Oct 2017 20:43:13 +0000 (16:43 -0400)]
broadway: Implement the GdkDisplay get_setting vfunc
This is just a trivial implementation.
Matthias Clasen [Mon, 30 Oct 2017 20:42:49 +0000 (16:42 -0400)]
quartz: Implement the GdkDisplay get_setting vfunc
Just call the GdkScreen vfunc.
Matthias Clasen [Mon, 30 Oct 2017 20:41:59 +0000 (16:41 -0400)]
mir: Implement the GdkDisplay get_setting vfunc
Just call the corresponding screen vfunc.
Matthias Clasen [Mon, 30 Oct 2017 20:39:49 +0000 (16:39 -0400)]
gdk: Add a get_setting vfunc to GdkDisplay
This will eventually replace the GdkScreen vfunc of the
same name.
Matthias Clasen [Mon, 30 Oct 2017 20:06:42 +0000 (16:06 -0400)]
Remove GdkScreen api usage
Use GdkDisplay equivalents where they exist.
Matthias Clasen [Mon, 30 Oct 2017 19:45:37 +0000 (15:45 -0400)]
Store the display inside GtkSettings
This is a step towards dropping GdkScreen.
Matthias Clasen [Mon, 30 Oct 2017 19:31:02 +0000 (15:31 -0400)]
Remove gdk_setting_get
This is a minor convenience api, and it is unused.
Matthias Clasen [Mon, 30 Oct 2017 14:07:19 +0000 (10:07 -0400)]
Forgotten files
Clean up the setting event from headers and docs too.
Matthias Clasen [Mon, 30 Oct 2017 13:47:26 +0000 (09:47 -0400)]
gdk: Drop settings events
We are not emitting these events anymore, so lets remove them
from the api. The GdkSettingAction enum is moved to xsettings-client.c
where its only use remains.
Matthias Clasen [Mon, 30 Oct 2017 13:36:01 +0000 (09:36 -0400)]
x11: Stop emitting settings events
Not needed anymore.
Matthias Clasen [Mon, 30 Oct 2017 13:35:45 +0000 (09:35 -0400)]
wayland: Stop emitting setting events
Not needed anymore.
Matthias Clasen [Mon, 30 Oct 2017 13:35:30 +0000 (09:35 -0400)]
quartz: Stop emitting setting events
Not needed anymore.
Matthias Clasen [Mon, 30 Oct 2017 13:35:11 +0000 (09:35 -0400)]
mir: Stop emitting setting events
Not needed anymore.
Matthias Clasen [Mon, 30 Oct 2017 13:34:45 +0000 (09:34 -0400)]
gtk: Stop handling settings events
We don't need this anymore, now that we use the ::setting-changed
signal.
Matthias Clasen [Mon, 30 Oct 2017 13:04:09 +0000 (09:04 -0400)]
gtk: Connect to GdkDisplay::setting-changed
We still handle the setting event, for now.
That will be removed in a future commit.
Matthias Clasen [Mon, 30 Oct 2017 13:03:25 +0000 (09:03 -0400)]
x11: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
Matthias Clasen [Mon, 30 Oct 2017 13:03:08 +0000 (09:03 -0400)]
wayland: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
Matthias Clasen [Mon, 30 Oct 2017 13:02:33 +0000 (09:02 -0400)]
quartz: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
Matthias Clasen [Mon, 30 Oct 2017 13:01:47 +0000 (09:01 -0400)]
mir: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
Matthias Clasen [Mon, 30 Oct 2017 13:00:49 +0000 (09:00 -0400)]
gdk: Add settings api to GdkDisplay
This commit adds gdk_display_get_setting and a ::setting-changed
signal, which will replace the settings event we use now. Note
that I've done away with the GdkSettingAction argument that the
event has, since we are not using it at all.
Lukas K [Sat, 28 Oct 2017 22:07:34 +0000 (00:07 +0200)]
make GDK_DEBUG=opengl work on win32
Chun-wei Fan [Thu, 31 Aug 2017 10:43:07 +0000 (18:43 +0800)]
input/IME: Defer the emit of the "commit" signal
On Windows, when IME is used, each keystroke results in the
WM_IME_COMPOSITION event being sent first. This means that in our case
when one decides on to accept the input that is in the preedit buffer,
we first get from Windows the WM_IME_COMPOSITION event
(where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
event (where we emit the pair of preedit-changed and preedit-end
signals).
Since commit
f11f989 (GtkEntry: Remove recompute idle), we do the input
recomputation directly, this will cause a pair of "Pango-WARNING:
Assertion failed: (index >= 0 && index <= layout->length)" being shown,
as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
to be reset to 0 in time as a result of the recomputation triggered by
the commit being done before the reset of priv->preedit_length and
priv->preedit_cursor (which are no longer valid as we essentially say
that we are done with the preedit buffer).
As we could only acquire the final string that was entered in this
preedit session when we handle the WM_IME_COMPOSITION event, fix this by
saving up the final string we acquire from Windows IME in UTF-8 when we
handle the WM_IME_COMPOSITION event from Windows, and emit the commit
signal with that string after we emit the preedit-changed and
preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
Windows, which comes afterwards.
Also fix the formatting of the code around the parts of the files that
was changed.
https://bugzilla.gnome.org/show_bug.cgi?id=787142
Benjamin Otte [Sat, 28 Oct 2017 23:26:22 +0000 (01:26 +0200)]
cssimagescaled: Remove now unused struct member
Benjamin Otte [Mon, 30 Oct 2017 01:30:05 +0000 (02:30 +0100)]
gdk: Remove leftovers from GdkScreen::size-changed removal
Benjamin Otte [Mon, 30 Oct 2017 00:53:09 +0000 (01:53 +0100)]
inspector: Use the new monitor change signals
And on't use the GdkScreen anymore now that the GdkDisplay provides all
the information we care about.
Benjamin Otte [Sun, 29 Oct 2017 12:16:57 +0000 (13:16 +0100)]
screen: Remove unused vfuncs
Timm Bäder [Sun, 29 Oct 2017 17:03:10 +0000 (18:03 +0100)]
widget: Make parent property read-only
Timm Bäder [Sun, 29 Oct 2017 16:27:53 +0000 (17:27 +0100)]
widget: Don't notify :parent when rearranging widgets
gtk_widget_reposition_after is also valid to call if the widget already
has a parent, so don't notify the parent property in that case.
Timm Bäder [Sun, 29 Oct 2017 15:10:12 +0000 (16:10 +0100)]
widget: Remove parent-set signal
When a widget unparents its child widget manually in finalize, this can
lead to the parent-set signal being emitted for those child widgets. The
parent already has a ref_count of 0 though, so it can't be used in a
meaningful way. Specifically, emitting the signal will already try to
ref the parent which prints a critical.
Since GtkWidget already has a "parent" property, one can use its notify
signal instead to get notified when the parent widget changes.
Timm Bäder [Sun, 29 Oct 2017 12:44:12 +0000 (13:44 +0100)]
inspector: Remove node != NULL check from recorder model
We use NULL to remove the selection.
Timm Bäder [Sat, 28 Oct 2017 17:23:06 +0000 (19:23 +0200)]
checkbutton: Destroy indicator widget when draw-indicator is FALSE
Benjamin Otte [Sun, 29 Oct 2017 10:41:12 +0000 (06:41 -0400)]
cssimagescaled: Just return the computed image
... instead of returning either itself with uncomputed images or a
copy of itself with only one computed image and lots of other
uncomputed images that we're never gonna look at again.
This fixes expressions like -gtk-scaled(-gtk-recolor(...),-gtk-recolor(...))
which Adwaita uses for checkmarks and bullets.
Matthias Clasen [Sat, 28 Oct 2017 20:10:46 +0000 (16:10 -0400)]
Avoid creating trivial shadow nodes
The Vulkan renderer creates a fallback surface for each shadow
node, even if we end up not rendering anything to it. Avoiding
this is a nice optimization.
Matthias Clasen [Sat, 28 Oct 2017 19:22:24 +0000 (15:22 -0400)]
Adwaita: Use scaled icons for checks and bullets
This gives us crip rendering on hidpi screens.
Matthias Clasen [Sat, 28 Oct 2017 19:20:11 +0000 (15:20 -0400)]
Adwaita: Add scaled version of bullets and checks
We use these assets as .symbolic.png now, so for hidpi, we
should provide @2 variants.
Matthias Clasen [Sat, 28 Oct 2017 18:38:49 +0000 (14:38 -0400)]
gsk: Apply scale factor for fallback rendering
This fixes blurry text and icons whenever we apply shadows
in a hidpi window. Shadow nodes are the last ones that we
still use fallback for, and this was causing us to render
the text blurry.
Matthias Clasen [Sat, 28 Oct 2017 18:38:21 +0000 (14:38 -0400)]
Triival cleanup
No need to go to the window, we store a copy of the scale factor
in the render pass object.
Matthias Clasen [Sat, 28 Oct 2017 18:30:03 +0000 (14:30 -0400)]
inspector: Show details for shadow nodes
One of the few node types that we're not detailing yet.
Matthias Clasen [Sat, 28 Oct 2017 17:13:31 +0000 (13:13 -0400)]
gsk: Scale glyphs in the glyph cache
Pass a scale factor when caching glyphs or looking them
up in the cache. The glyphs in the cache are rendered
with subpixel precision determined by the scale. Update
all callers to pass a scale factor according to the window
scale. This lets us render crisp glyphs on hidpi systems.
Matthias Clasen [Sat, 28 Oct 2017 15:57:53 +0000 (11:57 -0400)]
vulkan: Handle changing window scale
The code that checks for the proper size of the our swapchain
was not taking window scale fully into account. With this change,
setting the window scale to 2 in the inspector causes the window
to grow and rendering to be scaled up as expected, with Vulkan,
in the same way it already is with cairo.
Matthias Clasen [Sat, 28 Oct 2017 15:49:39 +0000 (11:49 -0400)]
gsk: Drop the GskRenderer::scale-factor property
This is can always be obtained from the window that is already
associated with the renderer, no need to maintain a separate
property for it.
Emmanuele Bassi [Thu, 16 Feb 2017 00:04:50 +0000 (00:04 +0000)]
x11: Query whether we have GLX support
Epoxy 1.4 has new ad hoc API that we can use to check whether GLX is
available on the current system.
If we didn't use this API, we'd have to manually dlopen libGL (or its
equivalent on different OSes) and check if it had GLX symbols; since
Epoxy already does all of this internally, we can simply ask it instead.
https://bugzilla.gnome.org/show_bug.cgi?id=775279
Emmanuele Bassi [Thu, 16 Feb 2017 00:03:05 +0000 (00:03 +0000)]
Bump up the dependency on libepoxy
We are going to use new API to detect whether or not GLX is available
before calling GL API.
https://bugzilla.gnome.org/show_bug.cgi?id=775279
Timm Bäder [Sat, 28 Oct 2017 09:46:35 +0000 (11:46 +0200)]
Adwaita: Add back visible focus outlines for list rows
Timm Bäder [Sat, 28 Oct 2017 09:37:13 +0000 (11:37 +0200)]
sizerequest: Don't pass uninitialized values to measure
The GtkWidgetClass::measure vfunc is not required to assign a value to
any of the (out) parameters, so we need to initialize the locals we pass
to it, otherwise we can end up with a garbage size request.
Federico Mena Quintero [Fri, 27 Oct 2017 22:04:02 +0000 (17:04 -0500)]
GtkPathBar: Centralize handling of outstanding cancellables
The path bar would crash if we disposed it before all pending I/O
operations had finished. Now we remember all the outstanding
operations directly in the GtkPathBarPrivate, and deal with them
consistently.
Matthias Clasen [Fri, 27 Oct 2017 21:13:40 +0000 (17:13 -0400)]
gsk: Make text nodes more compact
The copy of the PangoGlyphString we do here was showing up
in some profiles. To avoid it, allocate the PangoGlyphInfo array
as part of the node itself. Update all callers to deal with
the slight api change required for this.